package com.zsrt.tmall.user.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.zsrt.tmall.user.service.DoubleServcie;
import com.zsrt.tmall.user.service.UserService;

@Service
public class DoubleServcieImpl  implements  DoubleServcie {
	
	
	@Resource
	private UserService userService;

	
	@Transactional
	@Override
	public int buybuyDouble(int iphoneId, int huaweiId, String username, int qty) throws InterruptedException {
		
		for(int index=1; index<=qty;index++){
			userService.buybuy(iphoneId, huaweiId, username);
		}
		return 0;
	}
	
	

}
